#coding:utf-8
import sys
from PyQt5 import uic
from PyQt5.QtWidgets  import QApplication
from PyQt5.QtWidgets import QMainWindow

class Calc(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self)
        uic.loadUi('calc.ui',self)
        self.pushButton0.clicked.connect(self.a)
        self.pushButton1.clicked.connect(self.b)
        self.pushButton2.clicked.connect(self.c)
        self.pushButton3.clicked.connect(self.d)
        self.pushButton4.clicked.connect(self.e)
        self.pushButton5.clicked.connect(self.f)
        self.pushButton6.clicked.connect(self.g)
        self.pushButton7.clicked.connect(self.h)
        self.pushButton8.clicked.connect(self.k)
        self.pushButton9.clicked.connect(self.m)
        self.pushButton_clear.clicked.connect(self.calc_clear)
        self.pushButton_add.clicked.connect(self.calc_add)
        self.pushButton_sub.clicked.connect(self.calc_sub)
        self.pushButton_div.clicked.connect(self.calc_div)
        self.pushButton_mul.clicked.connect(self.calc_mul)
        self.pushButton_dot.clicked.connect(self.calc_dot)
        self.pushButton_equal.clicked.connect(self.calc_equal)
      
    def a(self):
        print '我被点击了0'
    def b(self):
        print '我被点击了1'   
    def c(self):
        print '我被点击了2'
    def d(self):
        print '我被点击了3'
    def e(self):
        print '我被点击了4'
    def f(self):
        print '我被点击了5'
    def g(self):
        print '我被点击了6'
    def h(self):
        print '我被点击了7'
    def k(self):
        print '我被点击了8'
    def m(self):
        print '我被点击了9'
    def calc_add(self):
        print '我被点击了add===='
    def calc_sub(self):
        print '我被点击了sub===='
    def calc_div(self):
        print '我被点击了div==='
    def calc_mul(self):
        print '我被点击了mul==='
    def calc_equal(self):
        print '我被点击了equal==='
    def calc_dot(self):
        print '我被点击了dot==='
    def calc_clear(self):
        print '我被点击了clear==='
if __name__ == '__main__':    
    app = QApplication(sys.argv)
    calc = Calc()
    calc.show()
    app.exec_()




